import request from '@/utils/request'

//查询被管理的仓库
export function getWarehouse(userId){
  return request({
    url : '/warehousemanager/item/warehouse/'+userId,
    method:'get'
  })
}
// 查询易耗品管理列表
export function listItem(querys) {
  return request({
    url: '/warehousemanager/item/list/',
    method: 'get',
    params:querys
  })
}

// 查询易耗品管理详细
export function getItem(itemId) {
  return request({
    url: '/warehousemanager/item/' + itemId,
    method: 'get'
  })
}
//查询物品类型列表
export function listType(){
  return request({
    url:'/warehousemanager/item/typeList',
    method:'get'
  })
}
// 新增易耗品管理
export function addItem(data) {
  return request({
    url: '/warehousemanager/item',
    method: 'post',
    data: data
  })
}

// 修改易耗品管理
export function updateItem(data) {
  return request({
    url: '/warehousemanager/item',
    method: 'put',
    data: data
  })
}

// 删除易耗品管理
export function delItem(itemId) {
  return request({
    url: '/warehousemanager/item/' + itemId,
    method: 'delete'
  })
}
export function addItemOut(data) {
  return request({
    url: '/warehousemanager/item/addWareOut',
    method: 'put',
    data: data
  })
}

